package com.hyzx.qbasic.admin.model.vo.req.admin;

import com.hyzx.qbasic.admin.model.vo.req.BaseRequest;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotEmpty;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * Created by 黄江华 on 2017/10/17
 */

public class EditResourceReq extends BaseRequest {

    @NotNull(message = "resourceId不能为空")
    @Min(value = 1, message = "resourceId必须大于0")
    private Integer resourceId;

    @NotEmpty(message = "资源名不能为空")
    @Length(max = 50, message = "资源名不能超过50个字符")
    private String name;

    @NotNull(message = "资源类型不能为空")
    @Range(min = 0, max = 2, message = "资源类型只能为0,1,2")
    private Integer type;

    @NotEmpty(message = "父资源ID不能为空")
    private List<Integer> parentIdList;

    @NotEmpty(message = "资源标识不能为空")
    @Length(max = 100, message = "资源标识不能超过100个字符")
    private String permission;

    @NotNull(message = "资源排序不能为空")
    @Range(min = 0, message = "资源排序不能小于0")
    private Integer priority;

    private String url;

    private String iconClass;

    public Integer getResourceId() {
        return resourceId;
    }

    public void setResourceId(Integer resourceId) {
        this.resourceId = resourceId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public List<Integer> getParentIdList() {
        return parentIdList;
    }

    public void setParentIdList(List<Integer> parentIdList) {
        this.parentIdList = parentIdList;
    }

    public String getPermission() {
        return permission;
    }

    public void setPermission(String permission) {
        this.permission = permission;
    }

    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getIconClass() {
        return iconClass;
    }

    public void setIconClass(String iconClass) {
        this.iconClass = iconClass;
    }
}
